package com.lsfb.duishangbaos.Login.ShopEnter;

import android.content.Context;
import android.view.View;

import com.lsfb.duishangbaos.R;
import com.zgscwjm.lsfbbasetemplate.Event.LsfbEvent;
import com.zgscwjm.lsfbbasetemplate.adapter.CommonRecycAdapter;
import com.zgscwjm.lsfbbasetemplate.adapter.ViewHolderRecyc;

import java.util.List;

/**
 * Created by Administrator on 2017/5/11 0011.
 */

public class ShopEnterAdapter extends CommonRecycAdapter<GetClaBean.ListBean> {
    public ShopEnterAdapter(Context context, List<GetClaBean.ListBean> list, int layoutId) {
        super(context, list, layoutId);
    }

    @Override
    public void convert(ViewHolderRecyc holder, final GetClaBean.ListBean model) {
        holder.setText(R.id.pop_text_countext, model.getName());

        holder.setOnclick(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ShopTypeClickEvent event = new ShopTypeClickEvent();
                event.setData(model);
                LsfbEvent.getInstantiation().post(event);
            }
        });

    }
}
